package com.ce.pms.charge.vo;

import java.math.BigDecimal;
import java.util.Date;
import java.util.Set;

import com.ce.pms.common.model.SysrefcodeDO;
import com.sitechasia.webx.core.model.IViewObject;

/***
 * 费用明细树型显示VO
 * @author yandawei
 *
 */
public class TransactionVO implements IViewObject {

	/**
	 * long：serialVersionUID
	 */
	private static final long serialVersionUID = 2745712618944858305L;

	/**
	 * 交易ID
	 */
	private Long transactionId;

	/**
	 * 收费项目id
	 */
	private Long chargeItemId;

	/**
	 * 交易名称(交易码+描述)
	 */
	private String transName;

	/***
	 * 交易名称(包括调,滞,减)
	 */
	private String transNameWithImage;

	/**
	 * 交易类型
	 */
	private String clazz;

	/**
	 * 交易类型名称
	 */
	private String clazzName;

	/**
	 * 收费周期
	 */
	private String period;

	/**
	 * 记账日期
	 */
	private Date handTime;

	/**
	 * 创建人id
	 */
	private Long creator;

	/**
	 * 操作人姓名
	 */
	private String operatorName;

	/**
	 * 所属主交易id
	 */
	private Long parentId;

	/**
	 * 交易码
	 */
	private String businessCode;

	/**
	 * checkbox字符串
	 */
	private String checkHead;

	/**
	 * checkbox对象
	 */
	private CheckBox checkBox;


	/**
	 * 所属主交易
	 */
	private TransactionVO parent;

	/**
	 * 子交易
	 */
	private Set<TransactionVO> children;

	/**
	 * 金额
	 */
	private BigDecimal price;

	/**
	 * 交易状态:001未缴;002已缴;003全额减免;004挂起;005出盘锁定
	 */
	private String statuz;

	/**
	 * 交易状态:001未缴;002已缴;003全额减免;004挂起;005出盘锁定
	 */
	private String statuzName;

	/**
	 *
	 */
	private Long chargeStandardVersionId;

	/**
	 * 来源房屋id
	 */
	private Long houseId;

	/**
	 * 凭证id
	 */
	private Long voucherId;

	/**
	 * 交易摘要
	 */
	private String remark;

	public String getBusinessCode() {
		return businessCode;
	}

	public void setBusinessCode(String businessCode) {
		this.businessCode = businessCode;
	}

	public Long getChargeItemId() {
		return chargeItemId;
	}

	public void setChargeItemId(Long chargeItemId) {
		this.chargeItemId = chargeItemId;
	}



	public Date getHandTime() {
		return handTime;
	}

	public void setHandTime(Date handTime) {
		this.handTime = handTime;
	}



	public Long getTransactionId() {
		return transactionId;
	}

	public void setTransactionId(Long transactionId) {
		this.transactionId = transactionId;
	}

	public String getTransName() {
		return transName;
	}

	public void setTransName(String transName) {
		this.transName = transName;
	}

	public Long getChargeStandardVersionId() {
		return chargeStandardVersionId;
	}

	public void setChargeStandardVersionId(Long chargeStandardVersionId) {
		this.chargeStandardVersionId = chargeStandardVersionId;
	}

	public CheckBox getCheckBox() {
		return checkBox;
	}

	public void setCheckBox(CheckBox checkBox) {
		this.checkBox = checkBox;
	}



	public String getCheckHead() {
		return checkHead;
	}

	public void setCheckHead(String checkHead) {
		this.checkHead = checkHead;
	}



	public Long getCreator() {
		return creator;
	}

	public void setCreator(Long creator) {
		this.creator = creator;
	}



	public BigDecimal getPrice() {
		return price;
	}

	public void setPrice(BigDecimal price) {
		this.price = price;
	}

	public Long getHouseId() {
		return houseId;
	}

	public void setHouseId(Long houseId) {
		this.houseId = houseId;
	}

	public Set<TransactionVO> getChildren() {
		return children;
	}

	public void setChildren(Set<TransactionVO> children) {
		this.children = children;
	}

	public TransactionVO getParent() {
		return parent;
	}

	public void setParent(TransactionVO parent) {
		this.parent = parent;
	}

	public Long getParentId() {
		return parentId;
	}

	public void setParentId(Long parentId) {
		this.parentId = parentId;
	}

	public String getStatuz() {
		return statuz;
	}

	public void setStatuz(String statuz) {
		this.statuz = statuz;
	}

	public String getPeriod() {
		return period;
	}

	public void setPeriod(String period) {
		this.period = period;
	}

	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	public String getClazz() {
		return clazz;
	}

	public void setClazz(String clazz) {
		this.clazz = clazz;
	}

	/**
	 * @return the operatorName
	 */
	public String getOperatorName() {
		return operatorName;
	}

	/**
	 * @param operatorName the operatorName to set
	 */
	public void setOperatorName(String operatorName) {
		this.operatorName = operatorName;
	}

	public Long getVoucherId() {
		return voucherId;
	}

	public void setVoucherId(Long voucherId) {
		this.voucherId = voucherId;
	}

	public String getClazzName() {
		return clazzName;
	}

	public void setClazzName(String clazzName) {
		this.clazzName = clazzName;
	}

	public String getStatuzName() {
		return statuzName;
	}

	public void setStatuzName(String statuzName) {
		this.statuzName = statuzName;
	}

	/**
	 * 功能描述: 判断交易类型是否为应收交易 <br>
	 * @return　true 是应收交易　false 不是应收交易
	 *
	 * Create author:付湘辉 <br>
	 * Create on:2008-8-29  <br>
	 * Edit author:  <br>
	 * Edit on:    <br>
	 * Why:     <br>
	 */
	public Boolean isDebitTransaction(){
		return SysrefcodeDO.FEE_TRANSACTION_CLAZZ_PRINCIPAL.equals(this.clazz)
				|| SysrefcodeDO.FEE_TRANSACTION_CLAZZ_RELIEF.equals(this.clazz)
				|| SysrefcodeDO.FEE_TRANSACTION_CLAZZ_ADJUSTMENT.equals(this.clazz)
				|| SysrefcodeDO.FEE_TRANSACTION_CLAZZ_LATEFEES.equals(this.clazz);
	}

	public String getTransNameWithImage() {
		return transNameWithImage;
	}

	public void setTransNameWithImage(String transNameWithImage) {
		this.transNameWithImage = transNameWithImage;
	}
}
